<!--
 * @Author: your name
 * @Date: 2021-09-29 10:30:29
 * @LastEditTime: 2021-09-30 09:46:53
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \smartCampus-admin\src\module\smartCampus\views\schoolConfig\schoolList\components\addSchoolPopup.vue
-->
<template>
    <sc-dialog title="人脸采集" v-model="propValue" custom-class="getFaceFromPopup" width="70vw" @close="_close">
        <div class="dialog-content pr70 pl30 pt20">
            <el-form ref="form" :model="form" label-width="110px">
                <el-form-item label="活动名称">
                    <el-input v-model="form.name"></el-input>
                </el-form-item>
                <el-form-item label="学校地址">
                    <el-cascader v-model="form.region" :options="locationOptions" @change="selectLocation"></el-cascader>
                </el-form-item>
                <el-form-item label="联系人">
                    <el-input v-model="form.name"></el-input>
                </el-form-item>
                <el-form-item label="联系方式">
                    <el-input v-model="form.name"></el-input>
                </el-form-item>
                <el-form-item label="状态">
                    <el-switch v-model="form.delivery"></el-switch>
                </el-form-item>
                <el-form-item label="第三方数据来源">
                    <el-radio-group v-model="form.resource">
                        <el-radio label="企业微信"></el-radio>
                        <el-radio label="钉钉"></el-radio>
                        <el-radio label="CSV文件导入"></el-radio>
                    </el-radio-group>
                </el-form-item>

            </el-form>
        </div>
        <span slot="footer" class="dialog-footer">
            <el-button size="medium" type="primary" @click="onSubmit">保存</el-button>
            <el-button size="medium" @click="_close">取消</el-button>
        </span>
    </sc-dialog>
</template>
<script>
    export default {
        name:'getFaceFromPopup',
        props: {
            value: {
                type: Boolean,
                default: false
            },
            data: {
                type: Object,
                default: () => ({})
            }
        },

        data() {
            return {
                echoFileList: [
                    /* { name: "food.jpeg", url: "https://img0.baidu.com/it/u=2130615794,142753515&fm=26&fmt=auto" } */
                ], //回显数据
                form: {
                    name: "",
                    region: "",
                    date1: "",
                    date2: "",
                    delivery: false,
                    type: [],
                    resource: "",
                    desc: ""
                },
                //地址选择
                locationOptions: [
                    {
                        value: "zhinan",
                        label: "指南",
                        children: [
                            {
                                value: "shejiyuanze",
                                label: "设计原则"
                            },
                            {
                                value: "daohang",
                                label: "导航",
                                children: [
                                    {
                                        value: "cexiangdaohang",
                                        label: "侧向导航"
                                    },
                                    {
                                        value: "dingbudaohang",
                                        label: "顶部导航"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        value: "zujian",
                        label: "组件",
                        children: [
                            {
                                value: "basic",
                                label: "Basic",
                                children: [
                                    {
                                        value: "layout",
                                        label: "Layout 布局"
                                    },
                                    {
                                        value: "color",
                                        label: "Color 色彩"
                                    },
                                    {
                                        value: "typography",
                                        label: "Typography 字体"
                                    },
                                    {
                                        value: "icon",
                                        label: "Icon 图标"
                                    },
                                    {
                                        value: "button",
                                        label: "Button 按钮"
                                    }
                                ]
                            },
                            {
                                value: "form",
                                label: "Form",
                                children: [
                                    {
                                        value: "radio",
                                        label: "Radio 单选框"
                                    },
                                    {
                                        value: "checkbox",
                                        label: "Checkbox 多选框"
                                    },
                                    {
                                        value: "input",
                                        label: "Input 输入框"
                                    },
                                    {
                                        value: "input-number",
                                        label: "InputNumber 计数器"
                                    },
                                    {
                                        value: "select",
                                        label: "Select 选择器"
                                    },
                                    {
                                        value: "cascader",
                                        label: "Cascader 级联选择器"
                                    },
                                    {
                                        value: "switch",
                                        label: "Switch 开关"
                                    },
                                    {
                                        value: "slider",
                                        label: "Slider 滑块"
                                    },
                                    {
                                        value: "time-picker",
                                        label: "TimePicker 时间选择器"
                                    },
                                    {
                                        value: "date-picker",
                                        label: "DatePicker 日期选择器"
                                    },
                                    {
                                        value: "datetime-picker",
                                        label: "DateTimePicker 日期时间选择器"
                                    },
                                    {
                                        value: "upload",
                                        label: "Upload 上传"
                                    },
                                    {
                                        value: "rate",
                                        label: "Rate 评分"
                                    },
                                    {
                                        value: "form",
                                        label: "Form 表单"
                                    }
                                ]
                            },
                            {
                                value: "data",
                                label: "Data",
                                children: [
                                    {
                                        value: "table",
                                        label: "Table 表格"
                                    },
                                    {
                                        value: "tag",
                                        label: "Tag 标签"
                                    },
                                    {
                                        value: "progress",
                                        label: "Progress 进度条"
                                    },
                                    {
                                        value: "tree",
                                        label: "Tree 树形控件"
                                    },
                                    {
                                        value: "pagination",
                                        label: "Pagination 分页"
                                    },
                                    {
                                        value: "badge",
                                        label: "Badge 标记"
                                    }
                                ]
                            },
                            {
                                value: "notice",
                                label: "Notice",
                                children: [
                                    {
                                        value: "alert",
                                        label: "Alert 警告"
                                    },
                                    {
                                        value: "loading",
                                        label: "Loading 加载"
                                    },
                                    {
                                        value: "message",
                                        label: "Message 消息提示"
                                    },
                                    {
                                        value: "message-box",
                                        label: "MessageBox 弹框"
                                    },
                                    {
                                        value: "notification",
                                        label: "Notification 通知"
                                    }
                                ]
                            },
                            {
                                value: "navigation",
                                label: "Navigation",
                                children: [
                                    {
                                        value: "menu",
                                        label: "NavMenu 导航菜单"
                                    },
                                    {
                                        value: "tabs",
                                        label: "Tabs 标签页"
                                    },
                                    {
                                        value: "breadcrumb",
                                        label: "Breadcrumb 面包屑"
                                    },
                                    {
                                        value: "dropdown",
                                        label: "Dropdown 下拉菜单"
                                    },
                                    {
                                        value: "steps",
                                        label: "Steps 步骤条"
                                    }
                                ]
                            },
                            {
                                value: "others",
                                label: "Others",
                                children: [
                                    {
                                        value: "dialog",
                                        label: "Dialog 对话框"
                                    },
                                    {
                                        value: "tooltip",
                                        label: "Tooltip 文字提示"
                                    },
                                    {
                                        value: "popover",
                                        label: "Popover 弹出框"
                                    },
                                    {
                                        value: "card",
                                        label: "Card 卡片"
                                    },
                                    {
                                        value: "carousel",
                                        label: "Carousel 走马灯"
                                    },
                                    {
                                        value: "collapse",
                                        label: "Collapse 折叠面板"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        value: "ziyuan",
                        label: "资源",
                        children: [
                            {
                                value: "axure",
                                label: "Axure Components"
                            },
                            {
                                value: "sketch",
                                label: "Sketch Templates"
                            },
                            {
                                value: "jiaohu",
                                label: "组件交互文档"
                            }
                        ]
                    }
                ]
            };
        },
        computed: {
            propValue: {
                get() {
                    return this.value;
                },
                set(nval) {
                    this.$emit("input", nval);
                }
            },
            propData: {
                get() {
                    return this.data;
                }
            }
        },
        methods: {
            // 选择地址
            selectLocation(value) {
                console.log(value);
            },
            //选择图片触发
            selectUploadImg(files) {
                console.log("files :>> ", files);
            },
            updata() {
                console.log("object :>> ", document.querySelector(".el-upload__input1"));
            },
            //关闭弹窗
            _close() {
                this.$emit("input", false);
            },
            onSubmit() {
                console.log("submit!");
            }
        }
    };
</script>
<style lang="scss" scoped>
    .getFaceFromPopup {
        .dialog-content {
        }
    }
</style>
